<%@ LANGUAGE="VBScript" %> <% cmonth=CStr(request("cmonth")) Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLStmt = " select to_char(to_date('" & cmonth & "','YYYYMM'),'Month YYYY') fmonth from dual" Set RS = Connection.Execute(SQLStmt) fmonth=CStr(RS("fmonth")) Set RS=nothing SQLStmt = " select user_name,count(jobid) jobs,round(sum(duration),1) elapsed from phoffline.crs_job_info " SQLStmt = SQLStmt & " where start_time between to_date('" & cmonth & "','YYYYMM') " SQLStmt = SQLStmt & " and add_months(to_date('" & cmonth & "','YYYYMM'),1) " SQLStmt = SQLStmt & " group by user_name " SQLStmt = SQLStmt & " order by elapsed " Set RS = Connection.Execute(SQLStmt) %> CSR Monthly Usage

CRS Usage during <%=fmonth%>

<% Do While Not RS.EOF %> <% RS.MoveNext Loop %>
User name Number of Jobs Elapsed Hours
"><%=RS("user_name")%> <%=RS("jobs")%> <%=RS("elapsed")%>
<% Set RS=nothing Connection.Close Set Connection=nothing %>